{
  //接口  命名: 大驼峰
  interface BoyFriend {
    readonly id: number;
    name: string;
    age: number;
    car?: string;
    cook: () => void;
    earn(): void;
  }

  let boy: BoyFriend;
  boy = {
    id: 1,
    name: "吴彦祖",
    age: 28,
    car: "比亚迪",
    cook: function () {
      console.log("我可以做西红柿炒鸡蛋");
    },
    earn: function () {
      console.log("我可以拍戏");
    },
  };

  let boy2: BoyFriend = {
    id: 2,
    name: "彭于晏",
    age: 27,
    cook: function () {
      console.log("我可以做酸辣土豆丝");
    },
    earn: function () {
      console.log("我也可以挣钱...");
    },
  };
}
